<template>
  <div class="sender">
    <div v-if="user">
      <ZgImgHolder
        class="header"
        isHead
        :src="user.head" />
      <div class="name">{{ user.name }}</div>
      <div class="time">{{ time | fromNow }}</div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
    }
  },
  props: {
    user: {
      type: Object,
      default: () => {
        return {
          head: '',
          name: ''
        }
      }
    },
    time: {
      type: String,
      default: ''
    }
  },
  mounted () {

  },
  methods: {
  }
}
</script>
<style lang="less" scoped>
.sender {
  position: relative;
  padding-left: 46px;
  color: #474747a8;
  .header {
    position: absolute;
    top: 0;
    left: 0;
  }
}
</style>
